from .base import *

__all__ = ['VideoItem']


# 视频
class VideoItem(BaseItem):
    item_type = 'video'  # 类型
    forwardNum = scrapy.Field()  # 转发数
    readNum = scrapy.Field()  # 阅读数/播放量
    commentNum = scrapy.Field()  # 评论数
    praiseNum = scrapy.Field()  # 点赞数
    uid = scrapy.Field()  # 作者Id

    column = scrapy.Field()  # 版块 > 分隔
    fromSource = scrapy.Field()  # 来源
    fromLink = scrapy.Field()  # 转载来源链接

    def __init__(self):
        super().__init__()
        self['type'] = 'video'


# bilibili短视频
class BilibiliVideoItem(VideoItem):
    coinNum = scrapy.Field()  # 投币数
    collectNum = scrapy.Field()  # 收藏数
    shareNum = scrapy.Field()  # 分享数
    reviewNum = scrapy.Field()  # 弹幕数
